{
 "cells": [
  {
   "cell_type": "raw",
   "metadata": {
    "raw_mimetype": "text/restructuredtext"
   },
   "source": [
    ".. _nb_isres:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    ".. meta::\n",
    "   :description: The stochastic ranking is based on bubble sort and provides infeasible solutions a chance to survive during the environment selection. Adding this selection to an evolution strategy method has shown to be an effective optimization method: Stochastic Ranking Evolutionary Strategy."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    ".. meta::\n",
    "   :keywords: Improved Stochastic Ranking Evolutionary Strategy, ISRES,  Constrained Optimization, Real-Valued Optimization, Single-objective Optimization, Python"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ISRES: Improved Stochastic Ranking Evolutionary Strategy"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Improved Stochastic Ranking Evolutionary Strategy <cite data-cite=\"isres\"></cite>."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "from pymoo.algorithms.soo.nonconvex.isres import ISRES\n",
    "from pymoo.problems import get_problem\n",
    "from pymoo.optimize import minimize\n",
    "\n",
    "problem = get_problem(\"g1\")\n",
    "\n",
    "algorithm = ISRES(n_offsprings=200, rule=1.0 / 7.0, gamma=0.85, alpha=0.2)\n",
    "\n",
    "res = minimize(problem,\n",
    "               algorithm,\n",
    "               (\"n_gen\", 200),\n",
    "               seed=1,\n",
    "               verbose=False)\n",
    "\n",
    "print(\"Best solution found: \\nX = %s\\nF = %s\\nCV = %s\" % (res.X, res.F, res.CV))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### API"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {
    "raw_mimetype": "text/restructuredtext"
   },
   "source": [
    ".. autoclass:: pymoo.algorithms.soo.nonconvex.isres.ISRES\n",
    "    :noindex:"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
